<!--
  Generated template for the RecyclingPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->

<ion-header style="position: fixed;top:0;z-index: 200;width: 100%;">
    <!--<a href="javascript:history.back(-1)" class="button button-icon icon ion-ios-arrow-back" nav-direction="back"></a>-->
  <ion-navbar color="mainColor">
    <ion-title>{{this._tname}}</ion-title>
  </ion-navbar>

</ion-header>
<div [style.padding-bottom.px]="0" style="padding-bottom: 0px;position: fixed;top:55px;z-index: 200;width: 100%;background-color: white;">
    <ion-segment [(ngModel)]="questionStatus"  color="mainColor" class="recytitle">
      <ion-segment-button value="all">
        <span>全部</span>
        <span>{{this.numall||'0'}}</span>
      </ion-segment-button>
      <ion-segment-button value="over">
        <span>已上传</span>
        <span>{{this.numy||"0"}}</span>
      </ion-segment-button>
      <ion-segment-button value="not">
        <span>未上传</span>
        <span>{{this.numw||"0"}}</span>
      </ion-segment-button>
      <ion-segment-button value="stop">
        <span>已暂停</span>
        <span>{{numz||"0"}}</span>
      </ion-segment-button>
    </ion-segment>
  </div>
<ion-content  style="margin-top: 48px;">
    <ion-refresher (ionRefresh)="doRefresh($event)">
        <ion-refresher-content
          pullingIcon="arrow-dropdown"
          pullingText="下拉刷新"
          refreshingSpinner="circles"
          refreshingText="正在刷新...">
        </ion-refresher-content>
      </ion-refresher>
  <!-- <div style="height:105px;"></div> -->
  <div [ngSwitch]="questionStatus" class="recy">
    <ul *ngSwitchCase="'all'" style="padding: 0" #inp>
      <li *ngFor="let n of this._list;let i=index;">
        <div class="question-info">
          <div>
            <ion-checkbox [(ngModel)]="n.ispicked" (click)="updateCucumber(i,n.ispicked,n.FAnswerId,n.FQId)"></ion-checkbox>
            <span>编号{{i+1}}</span>
            <span>{{n.FSummitTime}}</span>
            <span *ngIf="n.FUpdateloadState==-1">暂停</span>
            <span *ngIf="n.FUpdateloadState==1">计：{{n.UseTime}}未上传</span>
            <span *ngIf="n.FUpdateloadState==2">计：{{n.UseTime}}已上传</span>
            <ion-icon  [ngClass]="{'rotate': show[i]}" (click)="showControl(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="show[i]">
          <span (click)="recycli(n.FAnswerId)" *ngIf="n.FUpdateloadState==1">
              <ion-icon name="sync"></ion-icon>编辑
          </span>
          <span  (click)="goon(n.FAnswerId)" *ngIf="n.FUpdateloadState==-1">
            <ion-icon name="compass" *ngIf="show"></ion-icon>开始
          </span>
          <span (click)="OnDelete(i,n.FAnswerId,n.FQId)">
             <ion-icon name="trash"></ion-icon>删除
          </span>
        </div>
      </li>
      <li>
        <div class="recysubbutton" *ngIf="5">
          <div style="display: flex">
            <ion-checkbox [(ngModel)]="allse" (click)="allSe(allse)"></ion-checkbox>
            <span style="margin-left: 2px">全选</span>
          </div>
          <div (click)="alldelete()">
            <button ion-button color="danger">删除</button>
          </div>
          <div>
            <button ion-button color="danger" (click)= "UploadBtn()">上传</button>
          </div>
          <div>
            <button ion-button outline color="danger" (click)= "clearUpladed()">清空已上传</button>
          </div>
        </div>
      </li>
    </ul>
    <ul *ngSwitchCase="'over'" style="padding: 0" #inpover>
      <li *ngFor="let n of this._list;let i=index;">
        <div class="question-info" *ngIf="n.FUpdateloadState==2">
          <div>
            <ion-checkbox [(ngModel)]="n.ispicked" (click)="updateCucumberover(i,n.ispicked,n.FAnswerId,n.FQId)"></ion-checkbox>
            <span>编号{{i+1}}</span>
            <span>{{n.FSummitTime}}</span>
            <span *ngIf="n.FUpdateloadState==-1">暂停</span>
            <span *ngIf="n.FUpdateloadState==1">计：{{n.UseTime}}未上传</span>
            <span *ngIf="n.FUpdateloadState==2">计：{{n.UseTime}}已上传</span>
            <ion-icon  [ngClass]="{'rotate': showover[i]}" (click)="showControlover(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="showover[i]">
          <span (click)="recycli(n.FAnswerId)" *ngIf="n.FUpdateloadState==1">
              <ion-icon name="sync"></ion-icon>编辑
          </span>
          <span (click)="goon(n.FAnswerId)" *ngIf="n.FUpdateloadState==-1">
            <ion-icon name="compass" *ngIf="show"></ion-icon>开始
          </span>
          <span (click)="OnDeleteover(i,n.FAnswerId,n.FQId)">
             <ion-icon name="trash"></ion-icon>删除
          </span>
        </div>
      </li>
      <li>
        <div class="recysubbutton" *ngIf="5">
          <div style="display: flex">
            <ion-checkbox [(ngModel)]="allseover" (click)="allSeover(allseover)"></ion-checkbox>
            <span style="margin-left: 2px">全选</span>
          </div>
          <div (click)="alldeleteover()">
            <button ion-button color="danger">删除</button>
          </div>
          <div>
            <button ion-button color="danger" (click)= "UploadBtn()">上传</button>
          </div>
          <div>
            <button ion-button outline color="danger" (click)= "clearUpladed()">清空已上传</button>
          </div>
        </div>
      </li>
    </ul>
    <ul *ngSwitchCase="'not'" style="padding: 0" #inpnot>
      <li *ngFor="let n of this._list;let i=index;">
        <div class="question-info" *ngIf="n.FUpdateloadState==1">
          <div>
            <ion-checkbox [(ngModel)]="n.ispicked" (click)="updateCucumbernot(i,n.ispicked,n.FAnswerId,n.FQId)"></ion-checkbox>
            <span>编号{{i+1}}</span>
            <span>{{n.FSummitTime}}</span>
            <span *ngIf="n.FUpdateloadState==-1">暂停</span>
            <span *ngIf="n.FUpdateloadState==1">计：{{n.UseTime}}未上传</span>
            <span *ngIf="n.FUpdateloadState==2">计：{{n.UseTime}}已上传</span>
            <ion-icon  [ngClass]="{'rotate': shownot[i]}" (click)="showControlnot(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="shownot[i]">
          <span (click)="recycli(n.FAnswerId)" *ngIf="n.FUpdateloadState==1">
              <ion-icon name="sync"></ion-icon>编辑
          </span>
          <span (click)="goon(n.FAnswerId)" *ngIf="n.FUpdateloadState==-1">
            <ion-icon name="compass" *ngIf="show"></ion-icon>开始
          </span>
          <span (click)="OnDeletenot(i,n.FAnswerId,n.FQId)">
             <ion-icon name="trash"></ion-icon>删除
          </span>
        </div>
      </li>
      <li>
        <div class="recysubbutton" *ngIf="5">
          <div style="display: flex">
            <ion-checkbox [(ngModel)]="allsenot" (click)="allSenot(allsenot)"></ion-checkbox>
            <span style="margin-left: 2px">全选</span>
          </div>
          <div (click)="alldeletenot()">
            <button ion-button color="danger">删除</button>
          </div>
          <div>
            <button ion-button color="danger" (click)= "UploadBtn()">上传</button>
          </div>
          <div>
            <button ion-button outline color="danger" (click)= "clearUpladed()">清空已上传</button>
          </div>
        </div>
      </li>
    </ul>
    <ul *ngSwitchCase="'stop'" style="padding: 0" #inpstop>
      <li *ngFor="let n of this._list;let i=index;">
        <div class="question-info" *ngIf="n.FUpdateloadState==-1">
          <div>
            <ion-checkbox [(ngModel)]="n.ispicked" (click)="updateCucumberstop(i,n.ispicked,n.FAnswerId,n.FQId)"></ion-checkbox>
            <span>编号{{i+1}}</span>
            <span>{{n.FSummitTime}}</span>
            <span *ngIf="n.FUpdateloadState==-1">暂停</span>
            <span *ngIf="n.FUpdateloadState==1">计:{{n.UseTime}}未上传</span>
            <span *ngIf="n.FUpdateloadState==2">计:{{n.UseTime}}已上传</span>
            <ion-icon  [ngClass]="{'rotate': showstop[i]}" (click)="showControlstop(i)" name="arrow-up"></ion-icon>
          </div>
        </div>
        <div class="question-control" *ngIf="showstop[i]">
          <span (click)="recycli(n.FAnswerId)" *ngIf="n.FUpdateloadState==1">
              <ion-icon name="sync"></ion-icon>编辑
          </span>
          <span (click)="goon(n.FAnswerId)" *ngIf="n.FUpdateloadState==-1">
            <ion-icon name="compass" *ngIf="show"></ion-icon>开始
          </span>
          <span (click)="OnDeletestop(i,n.FAnswerId,n.FQId)">
             <ion-icon name="trash"></ion-icon>删除
          </span>
        </div>
      </li>
      <li>
        <div class="recysubbutton" *ngIf="5">
          <div style="display: flex">
            <ion-checkbox [(ngModel)]="allsestop" (click)="allSestop(allsestop)"></ion-checkbox>
            <span style="margin-left: 2px">全选</span>
          </div>
          <div>
            <button (click)="alldeletestop()" ion-button color="danger">删除</button>
          </div>
          <div>
            <button ion-button color="danger" (click)= "UploadBtn()">上传</button>
          </div>
          <div>
            <button ion-button outline color="danger" (click)= "clearUpladed()">清空已上传</button>
          </div>
        </div>
      </li>
    </ul>
  </div>
 <div style="height: 52px"></div>
</ion-content>
